<?php

/**
 * @author dungdhs@gmail.com
 * @copyright 2012
 */
 
function __libs_load($libName, $fileUrl, $isJs=true){
	if ($isJs) theme_js(system_path('library').$libName.'/'.$fileUrl);
	else theme_css(system_path('library').$libName.'/'.$fileUrl);
}

function __libs_pupload(){
	__libs_load('pupload', 'js/plupload.full.js');
	__libs_load('pupload', 'js/jquery.plupload.queue/jquery.plupload.queue.js');
	__libs_load('pupload', 'js/jquery.plupload.queue/css/jquery.plupload.queue.css', false);
}

function __libs_ckeditor(){
	__libs_load('ckeditor', 'ckeditor.js');
}

function __libs_maps(){	
	theme_js('http://maps.google.com/maps/api/js?sensor=false');
	__libs_load('gmaps', 'js/jquery-gmaps-latlon-picker.js');
}

function __libs_jqzoom(){
	__libs_load('jqzoom', 'js/jquery.jqzoom-core-pack.js');
	__libs_load('jqzoom', 'css/jquery.jqzoom.css', false);
}

function __libs_datetimepicker(){
	__libs_load('btdatetimepicker', 'bootstrap-datetimepicker.min.js');
	__libs_load('btdatetimepicker', 'bootstrap-datetimepicker.min.css', false);
	theme_js("$('.datetimepicker').datetimepicker({weekStart: 1,todayBtn:  1,autoclose: 1,todayHighlight: 1,startView: 2,forceParse: 0});");
}

function __libs_phototag(){
	__libs_load('phototag', 'libraries/jquery-ui-1.8.17.custom.min.js');
	__libs_load('phototag', 'libraries/jquery-ui-1.8.17.custom.css', false);
	__libs_load('phototag', 'js/jquery.phototag.js');
	__libs_load('phototag', 'css/styles2.css', false);
}

function __libs_jqnote(){
	__libs_load('jqnote', 'js/jquery-ui-1.8.17.custom.min.js');
	__libs_load('jqnote', 'js/jquery-notes_1.0.8.js');
	__libs_load('jqnote', 'css/style.css', false);
	__libs_load('jqnote', 'css/lteIE8.css', false);	
	__libs_load('jqnote', 'css/jquery-ui-1.8.17.custom.css', false);
}

function __libs_nanoscroller(){
	__libs_load('nanoscroller', 'jquery.nanoscroller.min.js');
	__libs_load('nanoscroller', 'nanoscroller.css', false);
	theme_js('$(".nano").nanoScroller();');
}